package com.robert.dagger2demo;

import android.util.Log;

import javax.inject.Inject;

import dagger.android.AndroidInjector;
import dagger.android.DaggerApplication;

public class SimpleApplication extends DaggerApplication {
    private static final String TAG = SimpleApplication.class.getSimpleName();

    @Inject
    void logInjection() {
        Log.i(TAG, "Injecting " + SimpleApplication.class.getSimpleName());
    }

    @Override
    public void onCreate() {
        super.onCreate();
    }

    @Override
    protected AndroidInjector<? extends DaggerApplication> applicationInjector() {
        return DaggerAppComponent.builder().create(this);
    }

}